﻿@model List<VehicleOOBWeb.Models.Cart>

@{
    ViewBag.Title = "Giỏ hàng";
    Layout = "~/Views/Shared/_Layout.cshtml";
    string returnURL = "/Home/Index";
    if (Request.Params["returnURL"] != null)
    {
        returnURL = Request.Params["returnURL"].ToString();
        returnURL = HttpUtility.UrlDecode(returnURL);
    }
}
<script src="~/Scripts/cart.js"></script>
@section featured {
    <div class="header2">
        <img class="right" src="/images/heder_bg.gif" alt="" />
        <h2 class="header2">Thông tin giỏ hàng</h2>
    </div>
}


<table class="tbInherit">
    <tr>
        <th>Tên</th>
        <th>Hãng Xe</th>
        <th>Giá</th>
        <th>Số lượng</th>
        <th></th>
    </tr>
    @if (Model != null)
    {
        foreach (var item in Model)
        {
        <tr id="tr_vid_@item.item_id">
            <td>
                @Html.DisplayFor(modelItem => item.item_name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.item_manufacturer)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.item_price)
            </td>
            <td>@item.item_quantity
            </td>
            <td>
                <a href="javascript:vehicle_cart.removeOutCart('@item.item_id')" >
                    <img src='/Images/icon-del.png' alt='del' />
                </a>
            </td>
        </tr>
        }
    }
    else
    { 
        <tr>
            <td colspan="6" style="text-align: center">Hiện giỏ hàng đang rỗng</td>
        </tr>     
    }
</table>
<br />
<div class="button-container">
    <span>
        <a href="/Order/Create">Thanh toán</a>
    </span>
</div>
<p>

    <br />
    <a href="@returnURL" >Tiếp tục mua hàng</a>
</p>

